#ifndef CATEGORY_H
#define CATEGORY_H

#include <QString>
#include <QIcon>
#include <QList>

class Widget
{
public:
    Widget(const QString &name = QString(),const QString &c=QString(),const QIcon &icon = QIcon());
    QString name() const;
    void setName(const QString &name);
    QIcon icon() const;
    void setIcon(const QIcon &icon);
    QString className()const;
    void setClassName(const QString &c);
    QString pluginName();
    void setPluginName(const QString &pluginName);
    bool isNull();
private:
    QString m_name;
    QIcon m_icon;
    QString m_class;
    QString m_pluginName;
};

class Category
{
public:
    Category(const QString &name= QString());

    QString name() const;
    void setName(const QString &name);
    int widgetCount() const;
    Widget widget(int idx) const;
    void removeWidget(int idx);
    void addWidget(const Widget &widget);

private:
    QString m_name;
    QList<Widget> m_widget_list;
};

typedef QList<Category> CategoryList;

#endif // CATEGORY_H
